﻿

using System;
using System.Runtime.Serialization;
using System.Collections.Generic;
using COM.Rights.Model;



namespace COM.Rights.BLL
{
    public partial class TOU
    {
        public List<TOUInfo> GetChildren(string id)
        {
            string filter = "PGID=@PGID";
            DBParameter dp = new DBParameter("PGID", id);

            List<DBParameter> dps = new List<DBParameter>();
            dps.Add(dp);
            List<TOUInfo> infos = GetList("", filter, "", dps);

            List<TOUInfo> result = new List<TOUInfo>();
            result.AddRange(infos);
            foreach (TOUInfo info in infos)
            {
                result.AddRange(GetChildren(info.GID));
            }
            return result;
        }
        partial void OnBLLCreated() { ConfigName = "Rights"; }
    }
}